package org.freespace.service;

import org.freespace.model.Job;
import com.baomidou.mybatisplus.extension.service.IService;
import org.freespace.model.Testplan;
import org.freespace.vo.JobVO;

import java.net.UnknownHostException;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 作业表 服务类
 * </p>
 *
 * @author liuqi
 * @since 2023-05-08
 */
public interface IJobService extends IService<Job> {

    void createJob(Job job) throws UnknownHostException, Exception;

    void executeJob(Testplan testplan, Job job, StringBuffer logBuff);

    List<Job> getWaitJob();

    void finishJob(String jobId, String ip, String endTime, String status);

    Map<String, Object> getTpsData(JobVO vo);

    Map<String, Object> getResponseTimeData(JobVO vo);

    Map<String, Object> getMaxResponseTimeData(JobVO vo);

    Map<String, Object> getline90Data(JobVO vo);

    Map<String, Object> getline95Data(JobVO vo);

    Map<String, Object> getline99Data(JobVO vo);

    void stop(Integer jobId);

    Object getPlatmforLog(Integer jobId);

    Set<String> getIpList(Integer jobId);
}
